/*
 * Copyright (c) 2016- 2020 qolome.com Inc. All Rights Reserved.
 * ProjectName: qolome-knowledge
 * FileName: DraftsBox.java
 * Author: jiangfeng@qolome.com
 * Date: 2020/3/22 下午2:44
 * LastModified: 2020/03/22 14:44:22
 */

package com.qolome.knowledge.design.pattern.memento.editor;

import java.util.Stack;

/**
 * @author Qolome
 * @version V1.0
 * @Description 草稿箱
 * @date 2020年 03月22日 14:44:16
 */
public class DraftsBox {

    private final Stack<ArticleMemento> stack = new Stack<>();

    public void addMemento(ArticleMemento articleMemento){
        stack.push(articleMemento);
    }

    public ArticleMemento getMemento(){
        return stack.pop();
    }

















}
